package com.vonchange.water.pvm.behavior;

import com.vonchange.water.pvm.execution.ActivityExecution;

import static com.vonchange.water.util.ScriptUtil.run;

public class GatewayActivityBehavior extends AbstractActivityBehavior{
    @Override
    public void executeMain(ActivityExecution execution) throws Exception {
        String script=  execution.findPvmActivityFieldValue("script").toString();
        run(script,execution.getProcessInstance().getVariables());
    }

    @Override
    public String activityType() {
        return "gateway";
    }

}
